package com.yellowpage.wf.data;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * NodeTemplate entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WF_NODE_TEMPLATE")
public class NodeTemplate implements java.io.Serializable {

	// Fields

	private Long nodeTemplateId;
	private String name;
	private String description;
	private String type;
	private Long workflowNodeId;
	private String template;
	private Long createUser;
	private Date createTime;
	private Long version;

	// Constructors

	/** default constructor */
	public NodeTemplate() {
	}

	/** full constructor */
	public NodeTemplate(String name, String description, String type,
			Long workflowNodeId, String template, Long createUser,
			Date createTime, Long version) {
		this.name = name;
		this.description = description;
		this.type = type;
		this.workflowNodeId = workflowNodeId;
		this.template = template;
		this.createUser = createUser;
		this.createTime = createTime;
		this.version = version;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "NODE_TEMPLATE_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getNodeTemplateId() {
		return this.nodeTemplateId;
	}

	public void setNodeTemplateId(Long nodeTemplateId) {
		this.nodeTemplateId = nodeTemplateId;
	}

	@Column(name = "NAME", length = 128)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "DESCRIPTION", length = 128)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "TYPE", length = 16)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "WORKFLOW_NODE_ID", precision = 18, scale = 0)
	public Long getWorkflowNodeId() {
		return this.workflowNodeId;
	}

	public void setWorkflowNodeId(Long workflowNodeId) {
		this.workflowNodeId = workflowNodeId;
	}

	@Column(name = "TEMPLATE")
	public String getTemplate() {
		return this.template;
	}

	public void setTemplate(String template) {
		this.template = template;
	}

	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "VERSION", precision = 18, scale = 0)
	public Long getVersion() {
		return this.version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

}